<!DOCTYPE html>
        <html>
        <head>
            <meta charset="UTF-8">
            <title>&#x5b89;&#x88c5;C&#x8bed;&#x8a00;&#x5f00;&#x53d1;&#x73af;&#x5883;</title>
            <style>
/* From extension vscode.github */
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

.vscode-dark img[src$=\#gh-light-mode-only],
.vscode-light img[src$=\#gh-dark-mode-only],
.vscode-high-contrast:not(.vscode-high-contrast-light) img[src$=\#gh-light-mode-only],
.vscode-high-contrast-light img[src$=\#gh-dark-mode-only] {
	display: none;
}

</style>
            
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<style>
            body {
                font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
                font-size: 14px;
                line-height: 1.6;
            }
        </style>
        <style>
.task-list-item {
    list-style-type: none;
}

.task-list-item-checkbox {
    margin-left: -20px;
    vertical-align: middle;
    pointer-events: none;
}
</style>
<style>
:root {
  --color-note: #0969da;
  --color-tip: #1a7f37;
  --color-warning: #9a6700;
  --color-severe: #bc4c00;
  --color-caution: #d1242f;
  --color-important: #8250df;
}

</style>
<style>
@media (prefers-color-scheme: dark) {
  :root {
    --color-note: #2f81f7;
    --color-tip: #3fb950;
    --color-warning: #d29922;
    --color-severe: #db6d28;
    --color-caution: #f85149;
    --color-important: #a371f7;
  }
}

</style>
<style>
.markdown-alert {
  padding: 0.5rem 1rem;
  margin-bottom: 16px;
  color: inherit;
  border-left: .25em solid #888;
}

.markdown-alert>:first-child {
  margin-top: 0
}

.markdown-alert>:last-child {
  margin-bottom: 0
}

.markdown-alert .markdown-alert-title {
  display: flex;
  font-weight: 500;
  align-items: center;
  line-height: 1
}

.markdown-alert .markdown-alert-title .octicon {
  margin-right: 0.5rem;
  display: inline-block;
  overflow: visible !important;
  vertical-align: text-bottom;
  fill: currentColor;
}

.markdown-alert.markdown-alert-note {
  border-left-color: var(--color-note);
}

.markdown-alert.markdown-alert-note .markdown-alert-title {
  color: var(--color-note);
}

.markdown-alert.markdown-alert-important {
  border-left-color: var(--color-important);
}

.markdown-alert.markdown-alert-important .markdown-alert-title {
  color: var(--color-important);
}

.markdown-alert.markdown-alert-warning {
  border-left-color: var(--color-warning);
}

.markdown-alert.markdown-alert-warning .markdown-alert-title {
  color: var(--color-warning);
}

.markdown-alert.markdown-alert-tip {
  border-left-color: var(--color-tip);
}

.markdown-alert.markdown-alert-tip .markdown-alert-title {
  color: var(--color-tip);
}

.markdown-alert.markdown-alert-caution {
  border-left-color: var(--color-caution);
}

.markdown-alert.markdown-alert-caution .markdown-alert-title {
  color: var(--color-caution);
}

</style>
        
        </head>
        <body class="vscode-body vscode-light">
            <h1 id="安装c语言开发环境">安装C语言开发环境</h1>
<p><strong>修改你的电脑账户名，确保用户名是英文的。</strong></p>
<p><strong>!!! 安装请选择默认语言为C !!!</strong></p>
<p>下载小熊猫C++：</p>
<p>注意下载<code>RedPanda.C++.x.x.win64.MinGW64_xx.x.Setup.exe</code>版本</p>
<p><a href="http://royqh.net/redpandacpp/download/">http://royqh.net/redpandacpp/download/</a></p>
<p>小熊猫C++入门教程：</p>
<p><a href="http://royqh.net/redpandacpp/docsy/docs/tutorials/basictutorial/">http://royqh.net/redpandacpp/docsy/docs/tutorials/basictutorial/</a></p>
<h2 id="测试代码">测试代码</h2>
<pre><code class="language-C"><span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string">&lt;math.h&gt;</span></span>

<span class="hljs-type">float</span> <span class="hljs-title function_">f</span><span class="hljs-params">(<span class="hljs-type">float</span> x, <span class="hljs-type">float</span> y, <span class="hljs-type">float</span> z)</span> {
    <span class="hljs-type">float</span> a = x * x + <span class="hljs-number">9.0f</span> / <span class="hljs-number">4.0f</span> * y * y + z * z - <span class="hljs-number">1</span>;
    <span class="hljs-keyword">return</span> a * a * a - x * x * z * z * z - <span class="hljs-number">9.0f</span> / <span class="hljs-number">80.0f</span> * y * y * z * z * z;
}

<span class="hljs-type">float</span> <span class="hljs-title function_">h</span><span class="hljs-params">(<span class="hljs-type">float</span> x, <span class="hljs-type">float</span> z)</span> {
    <span class="hljs-keyword">for</span> (<span class="hljs-type">float</span> y = <span class="hljs-number">1.0f</span>; y &gt;= <span class="hljs-number">0.0f</span>; y -= <span class="hljs-number">0.001f</span>)
        <span class="hljs-keyword">if</span> (f(x, y, z) &lt;= <span class="hljs-number">0.0f</span>)
            <span class="hljs-keyword">return</span> y;
    <span class="hljs-keyword">return</span> <span class="hljs-number">0.0f</span>;
}

<span class="hljs-type">int</span> <span class="hljs-title function_">main</span><span class="hljs-params">()</span> {
    <span class="hljs-keyword">for</span> (<span class="hljs-type">float</span> z = <span class="hljs-number">1.5f</span>; z &gt; <span class="hljs-number">-1.5f</span>; z -= <span class="hljs-number">0.05f</span>) {
        <span class="hljs-keyword">for</span> (<span class="hljs-type">float</span> x = <span class="hljs-number">-1.5f</span>; x &lt; <span class="hljs-number">1.5f</span>; x += <span class="hljs-number">0.025f</span>) {
            <span class="hljs-type">float</span> v = f(x, <span class="hljs-number">0.0f</span>, z);
            <span class="hljs-keyword">if</span> (v &lt;= <span class="hljs-number">0.0f</span>) {
                <span class="hljs-type">float</span> y0 = h(x, z);
                <span class="hljs-type">float</span> ny = <span class="hljs-number">0.01f</span>;
                <span class="hljs-type">float</span> nx = h(x + ny, z) - y0;
                <span class="hljs-type">float</span> nz = h(x, z + ny) - y0;
                <span class="hljs-type">float</span> nd = <span class="hljs-number">1.0f</span> / sqrtf(nx * nx + ny * ny + nz * nz);
                <span class="hljs-type">float</span> d = (nx + ny - nz) * nd * <span class="hljs-number">0.5f</span> + <span class="hljs-number">0.5f</span>;
                <span class="hljs-built_in">putchar</span>(<span class="hljs-string">&quot;.:-=+*#%@&quot;</span>[(<span class="hljs-type">int</span>)(d * <span class="hljs-number">5.0f</span>)]);
            }
            <span class="hljs-keyword">else</span>
                <span class="hljs-built_in">putchar</span>(<span class="hljs-string">&#x27; &#x27;</span>);
        }
        <span class="hljs-built_in">putchar</span>(<span class="hljs-string">&#x27;\n&#x27;</span>);
    }
}
</code></pre>
<p>复制以上代码, 在小熊猫C++里新建一个<code>heart.c</code>文件, 粘贴并运行。</p>
<p>程序会打印一个爱心图案, 说明你的环境配置成功了</p>

            
            
        </body>
        </html>